
import { _decorator, Component, Node } from 'cc';
import { PoolManager } from './framework/PoolManager';
const { ccclass, property } = _decorator;

/**
 * Predefined variables
 * Name = EnemyExplode
 * DateTime = Tue Feb 22 2022 21:57:11 GMT+0800 (中国标准时间)
 * Author = ashscc
 * FileBasename = EnemyExplode.ts
 * FileBasenameNoExtension = EnemyExplode
 * URL = db://assets/script/EnemyExplode.ts
 * ManualUrl = https://docs.cocos.com/creator/3.4/manual/en/
 *
 */
 
@ccclass('EnemyExplode')
export class EnemyExplode extends Component {
    // [1]
    // dummy = '';

    // [2]
    // @property
    // serializableDummy = 0;
    onEnable(){
        this.scheduleOnce(this._putBack, 1)
    }

    private _putBack(){
        PoolManager.putNode(this.node)
    }
    // update (deltaTime: number) {
    //     // [4]
    // }
}

/**
 * [1] Class member could be defined like this.
 * [2] Use `property` decorator if your want the member to be serializable.
 * [3] Your initialization goes here.
 * [4] Your update function goes here.
 *
 * Learn more about scripting: https://docs.cocos.com/creator/3.4/manual/en/scripting/
 * Learn more about CCClass: https://docs.cocos.com/creator/3.4/manual/en/scripting/decorator.html
 * Learn more about life-cycle callbacks: https://docs.cocos.com/creator/3.4/manual/en/scripting/life-cycle-callbacks.html
 */
